// 基础数据类型
let a:number = 123;
// a = 'i love you';
// any：任意的
let b:any = 123;
b = 'i love you';
console.log(b);

// void：没有值 用于函数的返回值
// let c:void = 123;
let c:void;

// 类型推测
let d;
d = 123;
d = true;
console.log(d);

// 类型推断、断言
let e;
e = 123;
console.log(<number>e)
// console.log(<string>e.length)
console.log((e as number));
e = 'i love you';
console.log((e as string).length);

// 数组
let arr:string[] = ['a', 'b'];
// let arr:string[] = ['a', 'b', true];
// arr.push(112);
console.log(arr);

// 元组
let brr:[string, boolean, number] = ['a', true, 1];
console.log(brr);
''